package dl.exception.handler;

import java.sql.SQLException;

public class ApplicationException extends Exception {

	private static final long serialVersionUID = 1L;

	private int errorNumber;

	public ApplicationException(int errorNumber) {
		this.errorNumber = errorNumber;
	}

	public ApplicationException(String errorMessage) {
		super(errorMessage);
	}

	public ApplicationException(Throwable throwableCause) {
		super(throwableCause);
	}

	public ApplicationException(String errorMessage, Throwable throwableCause) {
		super(errorMessage, throwableCause);
	}

	public ApplicationException(SQLException e) {
		super();
		System.out.println("Application Specific Error");
		e.printStackTrace();
	}

	public ApplicationException(IllegalArgumentException e) {
		super();
		System.out.println("Application Fatal Error");
		e.printStackTrace();
	}

	@Override
	public String toString() {
		return "ApplicationException[" + errorNumber + "]";
	}

}
